Skip to content

Conversation

@eatradish
Copy link
Contributor

No description provided.

@eatradish eatradish force-pushed the fix-linux-run branch 2 times, most recently from e3a91e9 to 676b198 Compare January 6, 2026 10:59
@eatradish eatradish changed the title fix: fix run ropy on linux feat: add linux platform support Jan 6, 2026
@eatradish
Copy link
Contributor Author

simplescreenrecorder-2026-01-06_19.06.15.mp4

LGTM on Plasma 6/Linux, X11

@StudentWeis
Copy link
Owner

Thank you very much for your contribution!

Could you further improve the activation and hiding of the window?

@StudentWeis
Copy link
Owner

image Some adjustments need to be made here. You can first see if Linux can reuse the conditional compilation of macos~

@eatradish eatradish force-pushed the fix-linux-run branch 4 times, most recently from 611213f to 680fa06 Compare January 7, 2026 08:39
@eatradish
Copy link
Contributor Author

eatradish commented Jan 7, 2026

It's not working correctly now:

  • tray icons are not displayed (no reason found)
  • hidden/active doesn't work (because gpui doesn't implement the relevant API, it needs to be implemented by other means)
  • 'alt-f4' doesn't work correctly (but setting it to ‘alt-f’ exits correctly, should be a bug in gpui)

…mal`

It seems that in Linux/KDE/X11, ropy will put the window on top by default,
but I've found that it seems to be possible not to do so by setting the window
mode to `Normal`, so I'll use that as a workaround for now.
@eatradish eatradish force-pushed the fix-linux-run branch 3 times, most recently from 618ed7e to 958d91b Compare January 7, 2026 10:33
@eatradish
Copy link
Contributor Author

Some preliminary workaround issues were identified:

simplescreenrecorder-2026-01-07_18.36.08.mp4

@eatradish eatradish force-pushed the fix-linux-run branch 4 times, most recently from 29cb329 to 663bab6 Compare January 8, 2026 07:50
@eatradish
Copy link
Contributor Author

LGTM tray icon:

simplescreenrecorder-2026-01-08_15.51.18.mp4

@eatradish eatradish force-pushed the fix-linux-run branch 2 times, most recently from 4ec5951 to 2bbcc92 Compare January 8, 2026 07:58
@eatradish eatradish force-pushed the fix-linux-run branch 2 times, most recently from 629d912 to 1335071 Compare January 8, 2026 08:45
@eatradish
Copy link
Contributor Author

LGTM:

simplescreenrecorder-2026-01-08_16.48.05.mp4

@eatradish eatradish force-pushed the fix-linux-run branch 3 times, most recently from 9c2f972 to 31f32fb Compare January 8, 2026 09:06
@eatradish eatradish force-pushed the fix-linux-run branch 5 times, most recently from f5a2bc4 to d2e21d0 Compare January 9, 2026 07:22
src/gui/tray.rs Outdated
});
}

thread::spawn(move || {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need to migrate this part? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of using another thread inside start_tray_handler_inner is to keep it from blocking gtk::main.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Linux, tray-icon crate requires some additional operations to load the tray, see https://github.com/tauri-apps/tray-icon/blob/dev/examples/egui.rs#L17 for details, and gtk::main requires blocking the entire thread, so you need to put the tray operations in another thread

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a GPUI's background task to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a GPUI's background task to do this?

Done

@StudentWeis
Copy link
Owner

Great job, thanks!

@StudentWeis StudentWeis merged commit 2ac6f15 into StudentWeis:main Jan 10, 2026
@StudentWeis
Copy link
Owner

Closes #10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants